<%@ Page Title="" Language="C#" MasterPageFile="~/SiteUser.master" AutoEventWireup="true" CodeFile="ViewCallStatus.aspx.cs" 
Inherits="carinsurance_ViewCallStatus" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="provider_inner">
        <h1>
            Call Status History</h1>
        <div class="right_action">
            <asp:HyperLink runat="server" Visible="false" ID="lnkNewCarUsage" NavigateUrl="#"
                Text="New"></asp:HyperLink>
        </div>
        <fieldset>
            <dl>
                <dt class="top_action">
                    <label>
                        Email :
                    </label>
                </dt>
                <dd>
                    <asp:TextBox ID="txtEmail" runat="server" Width="350px"></asp:TextBox>
                    <label>
                        CarId :
                    </label>
                    <asp:TextBox ID="txtSearch" runat="server" Width="100px" ToolTip="Search by CarId"
                        MaxLength="50" />
                    <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
                </dd>
            </dl>
            <dl>
                <div style="display: none">
                    <asp:TextBox runat="server" ReadOnly="true" ID="txtSearchKey" Text="0" />
                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCECarId" Text="0" />
                    <asp:TextBox runat="server" ReadOnly="true" ID="txtUserId" Text="0" />
                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCarId" Text="0" />
                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCICallTypeId" Text="100" />
                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCMCallTypeId" Text="101" />
                    <asp:TextBox ID="txtEmailAddress" runat="server" Text="0"></asp:TextBox>
                </div>
            </dl>
        </fieldset>
        <asp:GridView ID="grvCarInsurance" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            CellPadding="2" EmptyDataText="There are no data records to display." CssClass="progridstyle"
            SelectedRowStyle-CssClass="progridodd" GridLines="None" OnSelectedIndexChanged="grvCarInsurance_SelectedIndexChanged"
            PagerStyle-CssClass="pgrpro" DataSourceID="sqlDsCarInsurance" DataKeyNames="RefCEUserId,CECarId"
            AllowSorting="True" OnPageIndexChanged="grvCarInsurance_PageIndexChanged">
            <Columns>
                <asp:BoundField DataField="RefCEUserId" Visible="false" HeaderText="RefCEUserId"
                    SortExpression="RefCEUserId" />
                <asp:BoundField DataField="CECarId" HeaderText="CarId" SortExpression="CECarId" />
                <asp:BoundField DataField="SurName" HeaderText="SurName" SortExpression="SurName" />
                <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" />
                <asp:BoundField DataField="Mobile" HeaderText="Mobile" SortExpression="Mobile" />
                <asp:BoundField DataField="MakeModelDesc" HeaderText="MakeModelDesc" SortExpression="MakeModelDesc" />
                <asp:BoundField DataField="CoverageCommenceDate" HeaderText="Commencement Date" DataFormatString="{0:dd/MMM/yyyy}"
                    SortExpression="CoverageCommenceDate" />
                <asp:BoundField DataField="ModifiedDate" DataFormatString="{0:dd/MMM/yyyy hh:mm:ss tt}"
                    HeaderText="Quote Date/Time" SortExpression="ModifiedDate" />
                <asp:CommandField ShowSelectButton="True" />
            </Columns>
            <FooterStyle />
            <PagerStyle />
            <SelectedRowStyle CssClass="progridover" />
            <HeaderStyle CssClass="progridheader" />
            <EditRowStyle />
            <AlternatingRowStyle CssClass="progridodd" />
            <RowStyle CssClass="progrideven" />
        </asp:GridView>
        <asp:SqlDataSource ID="sqlDsCarInsurance" runat="server" ConnectionString="<%$ ConnectionStrings:CX_CRMDBConnectionString %>"
            SelectCommand="sprocCXCRMCarInsuranceQuotesListSelectByEmail" SelectCommandType="StoredProcedure">
            <SelectParameters>                
                <asp:ControlParameter ControlID="txtEmail" Name="Email" DefaultValue="0" PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="txtSearchKey" Name="SearchKey" DefaultValue="0" PropertyName="Text" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
    </div>
    <br />
    <br />
    <div runat="server" id="divEnrollStatus" visible="false" style="text-align:left; float:left; width:100%;">
            <table width="80%" border="0" cellpadding="2" cellspacing="2">
                <tr><td>&nbsp;</td></tr>
                <tr>
                    <td align="left" style="width:50%;">
                        <table width="100%" border="0" cellpadding="2" cellspacing="2">
                            <tr>
                                <td colspan="2">
                                    <asp:Label ID="Label1" runat="server" Text="Enroll Status" Font-Size="Large" Font-Bold="true" />
                                </td>
                            </tr>
                            <tr><td colspan="2">&nbsp;</td></tr>
                            <tr>
                                <td style="width:120px; font-weight:bold;" align="left" height="25">Quote Ref No</td>
                                <td style="font-weight:bold;" align="left">:&nbsp;
                                    <asp:Label runat="server" ID="lblQuoteRefNo" Font-Bold="true"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width:120px; font-weight:bold;" align="left" height="25">Enroll Status</td>
                                <td style="font-weight:bold;" align="left">:&nbsp;
                                    <asp:Label runat="server" ID="lblYes" ForeColor="Green" Font-Bold="true"></asp:Label>
                                    <asp:Label runat="server" ID="lblNo" ForeColor="red" Font-Bold="true"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width:120px; font-weight:bold;" align="left" height="25">Submited Date</td>
                                <td style="font-weight:bold;" align="left">:&nbsp;
                                    <asp:Label runat="server" ID="lblSubmitedDate" Font-Bold="true"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width:120px; font-weight:bold;" align="left" height="25">Company Name</td>
                                <td style="font-weight:bold;" align="left">:&nbsp;
                                    <asp:Label runat="server" ID="lblCompanyName" Font-Bold="true"></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr><td>&nbsp;</td></tr>
            </table>
        </div>
        <div runat="server" id="divCallStatus" visible="false">            
            <asp:Label ID="lblCarInsuranceCallStatus" runat="server" Text="Car Insurance - Call Status History" Font-Size="Large" Font-Bold="true" />
            <br />
            <asp:GridView ID="grvCarInsuranceCallStatus" runat="server" AllowPaging="True"
                AutoGenerateColumns="False" CellPadding="2" EmptyDataText="There are no data records to display."
                CssClass="progridstyle" GridLines="None" DataSourceID="sqlDsCarInsuranceCallStatus" DataKeyNames="CarId">
                <Columns>
                    <asp:BoundField DataField="CarId" HeaderText="CarId" SortExpression="CarId" />
                    <asp:BoundField DataField="AgentName" HeaderText="Agent Name" SortExpression="AgentName" />
                    <asp:BoundField DataField="CallStatus" HeaderText="Call Status" SortExpression="CallStatus" />
                    <asp:BoundField DataField="ModifiedDate" HeaderText="Submitted Date" DataFormatString="{0:dd/MMM/yyyy hh:mm:ss tt}"
                        SortExpression="ModifiedDate" />
                    <asp:BoundField DataField="Remark" HeaderText="Remarks" SortExpression="Remark" />
                </Columns>
                <FooterStyle />
                <PagerStyle />
                <SelectedRowStyle CssClass="progridover" />
                <HeaderStyle CssClass="progridheader" />
                <EditRowStyle />
                <AlternatingRowStyle CssClass="progridodd" />
                <RowStyle CssClass="progrideven" />
            </asp:GridView>
            <asp:SqlDataSource ID="sqlDsCarInsuranceCallStatus" runat="server" ConnectionString="<%$ ConnectionStrings:CX_CRMDBConnectionString %>"
                SelectCommand="sprocCXCRMCallStatusListSelectByCECarId" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtCarId" Name="CarId" PropertyName="Text" Type="Int64" />
                    <asp:ControlParameter ControlID="txtCICallTypeId" Name="CallTypeId" PropertyName="Text" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
            <br />
            <br />
            <asp:Label ID="lblCallMeCallStatus" runat="server" Text="Call Me - Call Status History" Font-Size="Large" Font-Bold="true" />
            <br />
            <asp:GridView ID="grvCallMeCallStatus" runat="server" AllowPaging="True"
                AutoGenerateColumns="False" CellPadding="2" EmptyDataText="There are no data records to display."
                CssClass="progridstyle" GridLines="None" DataSourceID="sqlDsCallMeCallStatus" DataKeyNames="CarId">
                <Columns>
                    <asp:BoundField DataField="CarId" HeaderText="CarId" SortExpression="CarId" />
                    <asp:BoundField DataField="AgentName" HeaderText="Agent Name" SortExpression="AgentName" />
                    <asp:BoundField DataField="CallStatus" HeaderText="Call Status" SortExpression="CallStatus" />
                    <asp:BoundField DataField="ModifiedDate" HeaderText="Submitted Date" DataFormatString="{0:dd/MMM/yyyy hh:mm:ss tt}"
                        SortExpression="ModifiedDate" />
                    <asp:BoundField DataField="Remark" HeaderText="Remarks" SortExpression="Remark" />
                </Columns>
                <FooterStyle />
                <PagerStyle />
                <SelectedRowStyle CssClass="progridover" />
                <HeaderStyle CssClass="progridheader" />
                <EditRowStyle />
                <AlternatingRowStyle CssClass="progridodd" />
                <RowStyle CssClass="progrideven" />
            </asp:GridView>
            <asp:SqlDataSource ID="sqlDsCallMeCallStatus" runat="server" ConnectionString="<%$ ConnectionStrings:CX_CRMDBConnectionString %>"
                SelectCommand="sprocCXCRMCallStatusListSelectByCECarId" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtCarId" Name="CarId" PropertyName="Text" Type="Int64" />
                    <asp:ControlParameter ControlID="txtCMCallTypeId" Name="CallTypeId" PropertyName="Text" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
            <br />
            <br />
        </div>

</asp:Content>

